package com.pcj.blog.dao;/**
 * @param
 * @author pcj
 * @date 2021/12/28 13:46
 * @return
 */

import com.pcj.blog.po.Type;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


import java.util.List;

/**
 *
 * @className TypeRepository
 * @author pengcj
 * @date 2021/12/28 13:46
 */

public interface TypeRepository extends JpaRepository<Type,Long> {
    Type findByName(String name);
    @Query("select t from Type t ")
    List<Type> findTop(Pageable pageable);
}
